package com.lanou.moving.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.lanou.moving.R;
import com.lanou.moving.base.BaseActivity;
import com.lanou.moving.utils.SkinSettingManager;

/**
 * Created by dllo on 15/11/6.
 *
 *
 * 换皮肤页面
 *
 */
public class MySkinActivity extends BaseActivity implements View.OnClickListener {
    private SkinSettingManager skinSettingManager;
    private ImageView iv1, iv2, iv3, iv4, iv5, iv6;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.myskin);
        init();
    }

    private void init() {
        skinSettingManager = new SkinSettingManager(this);
        skinSettingManager.initSkins();
        iv1 = (ImageView) findViewById(R.id.imageview1);
        iv1.setOnClickListener(this);
        iv2 = (ImageView) findViewById(R.id.imageview2);
        iv2.setOnClickListener(this);
        iv3 = (ImageView) findViewById(R.id.imageview3);
        iv3.setOnClickListener(this);
        iv4 = (ImageView) findViewById(R.id.imageview4);
        iv4.setOnClickListener(this);
        iv5 = (ImageView) findViewById(R.id.imageview5);
        iv5.setOnClickListener(this);
        iv6 = (ImageView) findViewById(R.id.imageview6);
        iv6.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.imageview1:
                skinSettingManager.toggleSkins(0);
                break;
            case R.id.imageview2:
                skinSettingManager.toggleSkins(1);
                break;
            case R.id.imageview3:
                skinSettingManager.toggleSkins(2);
                break;
            case R.id.imageview4:
                skinSettingManager.toggleSkins(3);
                break;
            case R.id.imageview5:
                skinSettingManager.toggleSkins(4);
                break;
            case R.id.imageview6:
                skinSettingManager.toggleSkins(5);
                break;
        }
    }
}
